//
//  Event.h
//  ObjCAS
//
//  Created by Colin Leung on 19/05/2010.
//  Copyright 2010 Digi3 Studio. All rights reserved.
//

#import <Foundation/Foundation.h>
static NSString * const EVENT_ACTIVATE;
static NSString * const EVENT_ADDED;
static NSString * const EVENT_ADDED_TO_STAGE;
static NSString * const EVENT_CANCEL;
static NSString * const EVENT_CHANGE;
static NSString * const EVENT_CLEAR;
static NSString * const EVENT_CLOSE;
static NSString * const EVENT_CLOSING;
static NSString * const EVENT_COMPLETE;
static NSString * const EVENT_CONNECT;
static NSString * const EVENT_COPY;
static NSString * const EVENT_CUT;
static NSString * const EVENT_DEACTIVATE;
static NSString * const EVENT_DISPLAYING;
static NSString * const EVENT_ENTER_FRAME;
static NSString * const EVENT_EXIT_FRAME;
static NSString * const EVENT_EXITING;
static NSString * const EVENT_FRAME_CONSTRUCTED;
static NSString * const EVENT_FULLSCREEN;
static NSString * const EVENT_HTML_BOUNDS_CHANGE;
static NSString * const EVENT_HTML_DOM_INITIALIZE;
static NSString * const EVENT_HTML_RENDER;
static NSString * const EVENT_ID3;
static NSString * const EVENT_INIT;
static NSString * const EVENT_LOCATION_CHANGE;
static NSString * const EVENT_MOUSE_LEAVE;
static NSString * const EVENT_NETWORK_CHANGE;
static NSString * const EVENT_OPEN;
static NSString * const EVENT_PASTE;
static NSString * const EVENT_REMOVED;
static NSString * const EVENT_REMOVED_FROM_STAGE;
static NSString * const EVENT_RENDER;
static NSString * const EVENT_RESIZE;
static NSString * const EVENT_SCROLL;
static NSString * const EVENT_SELECT;
static NSString * const EVENT_SELECT_ALL;
static NSString * const EVENT_SOUND_COMPLETE;
static NSString * const EVENT_TAB_CHILDREN_CHANGE;
static NSString * const EVENT_TAB_ENABLED_CHANGE;
static NSString * const EVENT_TAB_INDEX_CHANGE;
static NSString * const EVENT_UNLOAD;
static NSString * const EVENT_USER_IDLE;
static NSString * const EVENT_USER_PRESENT;

@interface Event : NSObject {
	id currentTarget;
	int eventPhase;
	id target;		

	BOOL bubbles;
	BOOL cancelable;
	NSString* type;
}

-(Event*) initWithType:(NSString*)_type;
-(Event*) initWithType:(NSString*)_type bubbles:(BOOL)_bubbles cancelable:(BOOL)_cancelable;

-(NSString*) toString;
@property (readonly) BOOL bubbles;
@property (readonly) BOOL cancelable;
@property (readonly) NSString *type;

@property (retain) id currentTarget;
@property (retain) id target;
@property (readonly) int eventPhase;
@end
